{% extends "../base.html" %}

{% block title %}Edit project{% endblock %}
{% block header %}Edit project{% endblock %}

{% block content %}
		<div style="width: 800">
		
			<a href="/projects">Projects</a>
			
			<div style="float:right">
			
				<a href="/roles?projectId={{ project.key }}" >Roles</a>
				<a href="/participants?projectId={{ project.key }}" >Participants</a>
				<a style="font-weight: bold" href="/tasks?projectId={{ project.key }}">Tasks</a>
			</div>
	
			<form method="POST" action="/editProject">
				<table>
					<tr>
						<td>
							Created by: 
						</td>
						<td>
							{{ project.creator.nickname }}		
						</td>
					</tr>
					<tr>
						<td>
							<label for="projectName">Project name: </label>
						</td>
						<td>
							<input maxlength="128" style="width: 250" id="projectName" name="projectName" value="{{ project.name }}"></input>		
						</td>
					</tr>
					<tr>
						<td>
							<label for="description">Description: </label>
						</td>
						<td>
							<textarea id="description" name="description" rows="3" cols="60">{{ project.description }}</textarea>		
						</td>
					</tr>
				</table>
				<input type="hidden" value="{{ project.key }}" name="projectId"></input>
				<input type="submit" value="Save"></input>
			</form>
			<form action="deleteProject" method="post">
				<input type="hidden" name="projectId" value="{{ project.key }}"></input>
				<input type="submit" value="Delete"></input>
			</form>
		</div>

{% endblock %}

